<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="/WEB-INF/common/common.jsp"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>科室信息-修改</title>
<link href="<%=path %>/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=path %>/third/jquery-validation-1.14.0/lib/jquery.js"></script>
<script type="text/javascript" src="<%=path %>/js/common.js"></script>
<script type="text/javascript" src="<%=path %>/third/My97DatePicker/WdatePicker.js"></script> 
<script>
var  _contextPath="<%=path%>";
var  _modulePath=_contextPath+"/sys/";

$(document).ready(function(e) {
    $(".btn").click(function(){
		_sbmForm(_modulePath+"textures_add.action?view=list","");
		});
});

</script>
<!-- 默认选中驾校名称-开始 -->
<script type="text/javascript">
 $(document).ready(function(){
		$(".school").each(function(){//循环获取所有单位编号 
			var schoolId = $(this).attr("value");
			var school = $("#serviceCarschoolId").attr("value");
			if(schoolId == school){
				$(this).attr("selected","selected");				
		}	
			
		});
	 });
</script>
<!-- 默认选中驾校名称-结束 -->
<!-- 默认选中教练名称-开始 -->
<script type="text/javascript">
 $(document).ready(function(){
		$(".userId").each(function(){//循环获取所有单位编号 
			var userId = $(this).attr("value");
			var user = $("#serviceCarUserId").attr("value");
			if(userId == user){
				$(this).attr("selected","selected");				
		}	
			
		});
	 });
</script>
<!-- 默认选中教练名称-结束 -->
<script type="text/javascript" src="<%= basePath%>third/jquery-validation-1.14.0/dist/jquery.validate.js"></script>
<script type="text/javascript" src="<%= basePath%>third/jquery-validation-1.14.0/dist/localization/messages_zh.js"></script>
<script type="text/javascript">
        $(function(){
			
			//如果是新增成功，会返回1，如果是1，则提示保存成功
			if("1" == "${actionState}"){
				alert('保存成功！');
			}
		 	
            $("#commonform").validate({
            
                errorClass: "errorInfo", //默认为错误的样式类为：error
                focusInvalid: false, //当为false时，验证无效时，没有焦点响应  
                onkeyup: false,   
                submitHandler: function(form){   //表单提交句柄,为一回调函数，带一个参数：form   
					checkFrom();
                    form.submit();   //提交表单   
                },   
                rules:{
                   
                    "studioId":{
                        required:true,
                    }
                },
                messages:{
                    
                    "studioName":{
                        required:"必填",
                    }
                  }
            });    
        }); 
        </script>
</head>

<body>

	<div class="place">
    <span>位置：</span>
    <ul class="placeul">
    <li><a href="#">首页</a></li>
    <li><a href="#">科室管理</a></li>
    <li><a href="#">科室基本信息</a></li>
    </ul>
    </div>
    
    <div class="formbody">
    
    <div class="formtitle"><span>科室基本信息</span></div>
    <form action="<%= basePath%>/biz/ServiceStudio_edit.action" method="post" id="commonform">
     
    <ul class="forminfo">
   
    
    <input name="serviceStudio.id" type="hidden" value="${serviceStudio.id }" />
     <li><label>科室编号</label><input name="serviceStudio.studioId" type="text"  class="dfinput" value="${serviceStudio.studioId}" />
    <li><label>科室名称</label><input name="serviceStudio.studioName" type="text"  class="dfinput" value="${serviceStudio.studioName}" />
     <li><label>科室地址</label><input name="serviceStudio.address" type="text"  class="dfinput" value="${serviceStudio.address}" />

    <li><label>&nbsp;</label><input name="" type="submit" class="btn" value="确认保存"/>
    <input name="add_btn" type="button" class="btn" style="background:gray" value="取消" onclick="location.href='javascript:history.go(-1);'"/>
    </li>
    </ul>
    </form>
    </div>
</body>



</html>
